* formal.do	JEP	01/27/15
* Build regression table
* Formal sector, wages

*************************** Change log ********************************** 

/*
	
*/	

clear 
version 13.1

* Project info
cap project, doinfo
if _rc==198 {
	if c(os)=="Unix" loc master "/home/jperez/AA_Minimum_Wage" 
	else if c(username)=="J16339" | c(username)=="A15858" loc master "B:\Col_Minimum_Wage" 
	else loc master "C:/Users/jorpp/Dropbox (Brown)/Col_Minimum_Wage"
	loc pr = 0
}
else {
	local master "`r(pdir)'"
	local doname "`r(dofile)'" 
	* Project calls
	project, relies_on("`master'/Code/Est/etable.do")
	foreach s in bp sst_emp_bp itct_bp {
		project, uses("`master'/ster/e4_new_indcc_nce/reg_`s'_tq(1999q1)_bite_o_ind_50_edom_indcc_nce.ster")
		project, uses("`master'/ster/e10_new_indcc_nce/reg_`s'_tq(1999q1)_bite_o_ind_50_edom_indcc_nce.ster")
		project, uses("`master'/ster/h4_new_indcc_nce/reg_`s'_tq(1999q1)_bite_horas_50_edom_indcc_nce.ster")
		project, uses("`master'/ster/h10_new_indcc_nce/reg_`s'_tq(1999q1)_bite_horas_50_edom_indcc_nce.ster")
	}
	
	loc pr =1
}

do "`master'/Code/Est/etable.do"

if `pr'==1 loc reg "register"


* Bite - mensual - by industry

etable, nrifs(4 4 4 10 10 10) time(1999q1) panels(bp sst_emp_bp itct_bp bp sst_emp_bp itct_bp) vars(o_ind horas) master(`master') outdir(`master'/Doc/tosubmit2/tab/emp_defl_nac) dom(_edom_indcc_nce) new(_new_indcc_nce_defl_nac) mw(bite) per(mensual) `reg'

if `pr' project, creates("`master'\Doc\tosubmit2\tab\emp\10_1999q1.tex")